package net.zisen.cloud.user.ctrl;

import net.zisen.cloud.base.msg.ResultMsg;
import net.zisen.cloud.ping.user.model.User;
import net.zisen.cloud.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @Classname UserCtrl
 * @Description TODO
 * @Date 2019-03-29 20:07
 * @Created by tim/278002989@qq.com
 */
@RestController
public class UserCtrl {

    @Autowired
    private UserService userService;

    @PostMapping(value = "register/user")
    public Object registerUser(@RequestBody User user) {
        return userService.registerUser(user);
    }

    @GetMapping(value = "register/user")
    public ResultMsg registerUserError() {
        return new ResultMsg(false);
    }
}
